From b847000161d2d525cfb602273e7350759edc2a74 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 15 Sep 2009 04:05:20 +0000 Subject: [PATCH] Add option gcsym to delbin. --- delbin.c | 4 +++- xmldoc/formats/options/delbin-gcsym.xml | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 xmldoc/formats/options/delbin-gcsym.xml diff --git a/delbin.c b/delbin.c index c1d2c1136..2359de58d 100644 --- a/delbin.c +++ b/delbin.c @@ -105,6 +105,7 @@ static char *opt_nuke_trk = NULL; static char *opt_nuke_rte = NULL; /* If true, Order hint to match Cache Register and Topo 7 */ static char *opt_hint_at_end = NULL; +static char *opt_gcsym = NULL; static arglist_t delbin_args[] = { @@ -121,6 +122,7 @@ static arglist_t delbin_args[] = { {"nukerte", &opt_nuke_rte, "Delete all waypoints before sending", NULL, ARGTYPE_BOOL, ARG_NOMINMAX }, {"hint_at_end", &opt_hint_at_end, "If true, geocache hint at end of text", NULL, ARGTYPE_BOOL, ARG_NOMINMAX }, + {"gcsym", &opt_gcsym, "If set to 0, prefer user-provided symbols over Groundspeaks ones for geocaches", NULL, ARGTYPE_BOOL, ARG_NOMINMAX, "1" }, ARG_TERMINATOR }; @@ -1135,7 +1137,7 @@ get_gc_notes(const waypoint* wp, int* symbol, char** notes, unsigned* notes_size } gbfprintf(fd, "Cache ID: %s\n", wp->shortname); - if (gc_sym) { + if (gc_sym && atoi(opt_gcsym)) { gbfprintf(fd, "%s\n", waypoint_symbol(gc_sym)); *symbol = gc_sym; } else if (wp->icon_descr) { diff --git a/xmldoc/formats/options/delbin-gcsym.xml b/xmldoc/formats/options/delbin-gcsym.xml new file mode 100644 index 000000000..777535fd2 --- /dev/null +++ b/xmldoc/formats/options/delbin-gcsym.xml @@ -0,0 +1,8 @@ + +This 1/0 option, defaulting to if not provided, tells GPSBabel to +use its own logic when sending data it can deduce is a geocache to +the device. If false, any icon data present in the source data will + be used instead. If you've taken control of the icon data, you are + responsible for providing valid icons; GPSBabel will make no attempt +to purify what gets sent. + -- 2.30.2